import { HintBtnView } from "../../mapUI/HintBtnView";
import { LayerManager } from "../../../manager/LayerManager";
import { ObjCreate } from "../../common/ObjCreate";
import { ResFileConst } from "../../../resource/ResFileConst";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { FilterConst } from "../../../../component/gconst/FilterConst";
import { DisplayUtil } from "../../../../common/DisplayUtil";
import { HighlightManager } from "../../../manager/HighlightManager";
import { GLoadedButton } from "../../../../../com/mui/controls/GLoadedButton";
import { SecTimerView } from "../../common/SecTimerView";
type int = number;
//class GuildRobCityCopyButton
    
    export  class GuildRobCityCopyButton extends HintBtnView
    {
        constructor()
        {
            super();
            this.layer = LayerManager.rightTopUILayer;
            this._btn = ObjCreate.createGLoadedButton(ResFileConst.RobCityCopyBtn, 0, 0, 60, 50, this);
            return;
        }

        /* internal  */createSectimer(): void
        {
            if (!this._sectimer) 
            {
                this._sectimer = ObjCreate.createSecTimeView("hh: mm: ss", -10, 55, 80, 20, this, GlobalStyle.getTextFormatCenter(GlobalStyle.textFormat1));
                this._sectimer.filters = [FilterConst.glowFilter];
                this._sectimer.timeOutHandler = this.disposeSectimer;
            }
            return;
        }

        /* internal  */disposeSectimer(): void
        {
            if (this._sectimer) 
            {
                DisplayUtil.removeMe(this._sectimer);
                this._sectimer.dispose();
                this._sectimer = null;
            }
            return;
        }

        public setLeftTime(arg1: int): void
        {
            this.createSectimer();
            this._sectimer.setLeftTime(arg1);
            return;
        }

        public hightLightBtn(arg1: Boolean): void
        {
            HighlightManager.instance.glowEffectButton(this._btn, arg1);
            return;
        }

        public /* override */ show(arg1: int=0, arg2: int=0): void
        {
            super.show(arg1, arg2);
            HighlightManager.instance.glowEffectButton(this._btn, true);
            return;
        }

        public /* override */ hide(): void
        {
            super.hide();
            HighlightManager.instance.glowEffectButton(this._btn, false);
            this.disposeSectimer();
            return;
        }

        public /* var */copyType: int;

        /* internal */ /* var */_btn: GLoadedButton;

        /* internal */ /* var */_sectimer: SecTimerView;
    }
